class ControllerMgr {
    private static _controllerMap:any
    constructor() {
        
    }
    public static getObj(name:string):any{
        if(!ControllerMgr._controllerMap){
            ControllerMgr._controllerMap = {};
        }
        return ControllerMgr._controllerMap[name];
    }


    public static new(cls:any,name:string):void{
        let ins:any = this.getObj(name);
        if (!ins) {
            ins = new cls();
            ControllerMgr._controllerMap[name] = ins;
        }
    }

}

function ctor(name:string) {
    return function (cls:any) {
        console.log("tar.name",cls.name);
        ControllerMgr.new(cls,name);
    }
}

function writeProp(){
    return function (cls:any) {
        
    }
    
}

@ctor("ta")
class TestA {
    private age:any;
    constructor() {
        console.log("创建了类TestA");
    }
}

let a = Reflect.construct(TestA,[]);
console.log("a",a);
